package finman.database;
/**
 * Encapsulate information about organization. Contain its name and description.
 */
public class Organization {
	private String name;
	private String description;

    /**
     * Creates organization with name and description.
     */
	Organization(String name, String description) {
		this.name = name;
		this.description = description;
	}


    @Override
    public int hashCode() {
        return name.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Organization)) {
            return false;
        }
        Organization organization = (Organization) obj;
        return name.equals(organization.name);
    }

    @Override
    public String toString() {
        return name;
    }
}